import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User: 花海
 * Date: 2022-11-22
 * Time: 11:17
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while (sc.hasNextLine()){
            String str=sc.nextLine();
            String[]strarr=str.split(" ");

        for (int i = strarr.length-1; i >=0; i--) {
            System.out.print(strarr[i]);
            System.out.print(" ");
        }
            }

    }
}
